/* Patient Management CSS */

/* Patient List */
.patient-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.patient-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.patient-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.patient-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 1rem;
    flex-shrink: 0;
}

.patient-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.patient-info {
    flex: 1;
}

.patient-info h4 {
    margin: 0 0 0.25rem;
    font-size: 1rem;
    font-weight: 600;
}

.patient-info p {
    margin: 0;
    font-size: 0.875rem;
    color: #6c757d;
}

.patient-status {
    margin: 0 1rem;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.badge-warning {
    background-color: #fff8e1;
    color: #f57c00;
}

.badge-danger {
    background-color: #ffebee;
    color: #c62828;
}

.patient-actions {
    display: flex;
    gap: 0.5rem;
}

.patient-actions .btn-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f8f9fc;
    border: none;
    color: #4e73df;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.patient-actions .btn-icon:hover {
    background-color: #4e73df;
    color: #fff;
}

/* Card Actions */
.card-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-box {
    position: relative;
    flex: 1;
}

.search-box input {
    padding-right: 2.5rem;
}

.search-box i {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #b7b9cc;
}

/* Medical Records List */
.medical-record-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.medical-record-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.medical-record-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.record-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: #4e73df;
    color: #fff;
    border-radius: 0.5rem;
    margin-right: 1rem;
    text-align: center;
}

.record-date .date {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.record-date .month {
    font-size: 0.75rem;
}

.record-details {
    flex: 1;
}

.record-details h4 {
    margin: 0 0 0.25rem;
    font-size: 1rem;
    font-weight: 600;
}

.record-details p {
    margin: 0;
    font-size: 0.875rem;
    color: #6c757d;
}

.record-actions .btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    border-radius: 0.25rem;
    background: transparent;
    border: 1px solid #4e73df;
    color: #4e73df;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.record-actions .btn-sm:hover {
    background: #4e73df;
    color: #fff;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1.5rem;
}

.btn-page {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f8f9fc;
    border: none;
    color: #4e73df;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.btn-page:hover {
    background-color: #4e73df;
    color: #fff;
}

.page-info {
    margin: 0 1rem;
    font-size: 0.875rem;
    color: #6c757d;
}

/* Full width button */
.full-width {
    display: block;
    width: 100%;
    margin-top: 1.5rem;
}

/* Patient Management Container */
.patient-management-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

/* Stats Row */
.stats-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.stat-item {
    flex: 1;
    text-align: center;
    padding: 1.5rem;
    background: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #4e73df;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: #6c757d;
}

/* Filter Dropdown */
.filter-dropdown select {
    padding: 0.375rem 2rem 0.375rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid #d1d3e2;
    border-radius: 0.25rem;
    color: #6e707e;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='4' viewBox='0 0 8 4'%3E%3Cpath fill='%236e707e' d='M0 0l4 4 4-4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 8px 4px;
    appearance: none;
}

/* Batch Actions */
.batch-actions {
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Loading Indicator */
.loading-indicator {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
}

.loading-indicator i {
    margin-right: 0.5rem;
}

/* Patient Checkboxes */
.patient-checkbox {
    margin-right: 1rem;
}

/* Add Patient Modal */
.search-tabs {
    display: flex;
    margin-bottom: 1rem;
    border-bottom: 1px solid #e3e6f0;
}

.search-tabs .tab {
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    font-weight: 500;
}

.search-tabs .tab.active {
    border-bottom-color: #4e73df;
    color: #4e73df;
}

.input-with-button {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.input-with-button input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d3e2;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

.input-with-button input:focus {
    border-color: #4e73df;
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

.input-with-button .btn {
    padding: 0.5rem 1rem;
    border: none;
    background-color: #4e73df;
    color: white;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.input-with-button .btn:hover {
    background-color: #3a5fc8;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #4e5155;
}

/* Search Results */
.search-results {
    margin-top: 1.5rem;
    border-top: 1px solid #e3e6f0;
    padding-top: 1.5rem;
    max-height: 300px;
    overflow-y: auto;
}

.search-result {
    display: flex;
    align-items: center;
    padding: 1rem;
    margin-bottom: 0.5rem;
    background: #f8f9fc;
    border-radius: 0.5rem;
    transition: background-color 0.2s ease;
}

.search-result:hover {
    background: #eaecf4;
}

.search-result-info {
    flex: 1;
}

.search-result-info h4 {
    margin: 0 0 0.25rem;
    font-size: 1rem;
    font-weight: 600;
}

.search-result-info p {
    margin: 0.125rem 0;
    font-size: 0.875rem;
    color: #6c757d;
}

.search-result .btn {
    padding: 0.375rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

.no-results {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
}

@media (max-width: 992px) {
    .patient-management-container {
        grid-template-columns: 1fr;
    }
}

.appointment-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.appointment-actions {
    display: flex;
    gap: 0.5rem;
}

.message-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: #fff;
    border-radius: 0.5rem;
}

.message-item.unread {
    background: #f0f7ff;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 1rem;
    flex-shrink: 0;
}

.message-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.message-content {
    flex: 1;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.message-header h4 {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 600;
}

.message-time {
    font-size: 0.75rem;
    color: #6c757d;
}

.message-content p {
    margin: 0.25rem 0 0;
    font-size: 0.875rem;
    color: #6c757d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-block {
    display: block;
    width: 100%;
    padding: 0.75rem;
}

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
}

.btn-outline {
    background: transparent;
    border: 1px solid #4e73df;
    color: #4e73df;
}

.btn-outline:hover {
    background: #4e73df;
    color: #fff;
}

.btn-outline-danger {
    background: transparent;
    border: 1px solid #e74a3b;
    color: #e74a3b;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    min-width: 250px;
    max-width: 350px;
    padding: 12px 16px;
    border-radius: 4px;
    background-color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toast-content i {
    font-size: 1.25rem;
}

.toast-success {
    border-left: 4px solid #4CAF50;
}

.toast-success i {
    color: #4CAF50;
}

.toast-error {
    border-left: 4px solid #F44336;
}

.toast-error i {
    color: #F44336;
}

.toast-warning {
    border-left: 4px solid #FF9800;
}

.toast-warning i {
    color: #FF9800;
}

.toast-info {
    border-left: 4px solid #2196F3;
}

.toast-info i {
    color: #2196F3;
}

/* Patient Details */
.patient-details-container {
    margin-top: 1.5rem;
}

.patient-profile {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.patient-avatar-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 2rem;
    flex-shrink: 0;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
}

.patient-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.patient-basic-info {
    flex: 1;
}

.patient-basic-info h2 {
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.patient-basic-info p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
    color: #6c757d;
}

.patient-basic-info p i {
    width: 20px;
    margin-right: 0.5rem;
    text-align: center;
}

.relationship-status {
    margin-top: 1rem;
}

.patient-tabs {
    display: flex;
    border-bottom: 1px solid #e3e6f0;
    margin-bottom: 1.5rem;
}

.patient-tabs .tab {
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    font-weight: 500;
}

.patient-tabs .tab.active {
    border-bottom-color: #4e73df;
    color: #4e73df;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.info-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: #f8f9fc;
    border-radius: 0.5rem;
}

.info-section h4 {
    margin: 0 0 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #4e73df;
}

.info-item {
    display: flex;
    margin-bottom: 0.5rem;
}

.info-item strong {
    width: 150px;
    font-weight: 600;
}

/* Modal styles for patient management */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    padding: 20px;
}

.modal-content {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    width: 550px;
    max-width: 100%;
    margin: auto;
    position: relative;
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-content.modal-sm {
    width: 400px;
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eaeaea;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
    font-weight: 600;
}

.modal-body {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #eaeaea;
    display: flex;
    justify-content: flex-end;
}

.modal-footer button {
    margin-left: 10px;
}

/* Override default modal display for patient management */
#add-patient-modal {
    display: none;
    overflow-y: auto;
}

#add-patient-modal.show {
    display: flex;
} 